import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/home'
import hot from "@/views/movie/pages/hot"
import coming from "@/views/movie/pages/coming"

Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'Home',
    component: Home,
    meta: {
      isshow: true
    }
  },
  {
    path: '/movie',
    name: 'Movie',
    redirect: "/movie/hot",
    meta: {
      isshow: true
    },
    component: () => import('../views/movie'),
    children: [{
      path: "hot",
      component: hot,
      meta: {
        isshow: true
      }
    }, {
      path: "coming",
      component: coming,
      meta: {
        isshow: true
      },
     
    }]
  },
  {
    path: '/cinema',
    name: 'Cinema',
    component: () => import('../views/cinema'),
    meta: {
      isshow: true
    }
  },
  {
    path: '/cinema/cinemaAddress',
    name: 'cinemaAddress',
    meta:{
      isshow:false,
    },
    component: () => import('../views/cinema/cinemaAddress/index.vue')
  },
  {
    path: '/cinema/cinemaDetail',
    name: 'cinemaDetail',
    meta:{
      isshow:false,
    },
    component: () => import('../views/cinema/cinemaDetail')
  },
  {
    path: '/cinema/cinemaGps',
    name: 'cinemaGps',
    meta:{
      isshow:false,
    },
    component: () => import('../views/cinema/cinemaGps')
  },
  // {
  //   path: '/cinemaInfo',
  //   name: 'cinemaInfo',
  //   component: () => import('../views/cinema/cinemaInfo')
  // },
  {
    path: '/cinema/cinemaOrder',
    name: 'cinemaOrder',
    meta:{
      isshow:false,
    },
    component: () => import('../views/cinema/cinemaOrder')
  },
  {
    path: '/cinema/cinemaSeat',
    name: 'cinemaSeat',
    meta:{
      isshow:false,
    },
    component: () => import('../views/cinema/cinemaSeat')
  },
  {
    path: '/user',
    name: 'User',
    component: () => import('../views/user'),
    meta: {
      isshow: true
    }
  },
  {
    path: '/ticket',
    name: 'Ticket',
    component: () => import('../views/ticket'),
    meta: {
      isshow: true
    },
    path: '/user',
    name: 'User',
    component: () => import('../views/user'),
    meta: {
      isshow: true
    }
  },
  {
    path: '/ticket',
    name: 'Ticket',
    component: () => import('../views/ticket'),
    meta: {
      isshow: true
    }
  },
  {
    path: '/login',
    name: 'Login',
    meta:{
      isshow:false
    },
    component: () => import('../views/user/pages/login.vue')
  },
  {
    path: '/user/userInfo',
    name: 'UserInfo',
    meta:{
      isshow:false
    },
    component: () => import('../views/user/pages/userInfo.vue')
  },
  {
    path: '/user/set',
    name: 'Set',
    meta:{
      isshow:false
    },
    component: () => import('../views/user/pages/set.vue')
  },
  {
    path: '/user/message',
    name: 'Message',
    meta:{
      isshow:false
    },
    component: () => import('../views/user/pages/message.vue')
  },
  {
    path: '/user/messageList/:id',
    name: 'MessageList',
    meta:{
      isshow:false
    },
    component: () => import('../views/user/pages/messageList.vue')
  },
  {
    path: '/user/vipcard',
    name: 'Vipcard',
    meta:{
      isshow:false
    },
    component: () => import('../views/user/pages/vipcard.vue')
  },
  {
    path: '/user/youhuijuan',
    name: 'Youhuijuan',
    meta:{
      isshow:false
    },
    component: () => import('../views/user/pages/youhuijuan.vue')
  },
  {
    path: '/user/order/:id',
    name: 'Order',
    meta:{
      isshow:false
    },
    component: () => import('../views/user/pages/order.vue'),
  },
  {
    path: '/user/mycard/:ids',
    name: 'Mycard',
    meta:{
      isshow:false
    },
    component: () => import('../views/user/pages/mycard.vue'),
  },
  {
    path: '/movie/point/:id',
    name: 'point',
    component: () => import('@/views/movie/pages/point'),
    meta: {
      isshow: false
    }
  }, {
    path: '/movie/actor/:id',
    name: 'actor',
    component: () => import('@/views/movie/pages/actor'),
    meta: {
      isshow: false
    }
  },
  {
    path: '/movie/rating/:id',
    name: 'rating',
    component: () => import('@/views/movie/pages/rating'),
    meta: {
      isshow: false
    }
  },
  {
    path: '/movie/office/:id',
    name: 'office',
    component: () => import('@/views/movie/pages/office'),
    meta: {
      isshow: false
    }
  },
  {
    path: '/movie/review',
    name: 'review',
    component: () => import('@/views/movie/pages/review'),
    meta: {
      isshow: false
    }
  }, {
    path: '/location',
    name: 'Location',
    meta: {
      isshow: false
    },
    component: () => import('../views/location')
  }, {
    path: '/home/signIn',
    name: 'signin',
    meta: {
      isshow: false
    },
    component: () => import('../views/signin')
  },
 
]

  


const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
  linkActiveClass: 'active'
})

export default router